package com.apesource.project02.controller;

import com.apesource.project02.pojo.MarathonEvent;
import com.apesource.project02.pojo.Registration;
import com.apesource.project02.pojo.User;
import com.apesource.project02.service.IMarathonEventService;
import com.apesource.project02.service.IRegistrationService;
import com.apesource.project02.service.IUserServer;
import com.apesource.project02.util.ResponseEntity;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @version 1.0
 * @auther:暮雪
 * @date:2025/9/19
 */
@RestController
@RequestMapping("/registrations")
public class RegistrationController {

    @Autowired
    private IRegistrationService registrationService;

    @PostMapping
    public ResponseEntity<Registration> registerForMarathon(@RequestBody Registration registration) {
            return registrationService.registerMarathonEvent(registration);
    }
}
